package com.example.qny01.service.impl;

import com.example.qny01.mapper.TeacherMapper;
import com.example.qny01.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import qny01.pojo.Teacher;

import javax.annotation.Resource;
import java.util.List;
@Service
public class TeacherServiceImpl implements TeacherService {
    @Resource
    private TeacherMapper teacherMapper;

    @Override
    public List<Teacher> selectAll() {
        return teacherMapper.selectAll();
    }

    @Override
    public Teacher selectById(Integer id) {
        return teacherMapper.selectById(id);
    }

    @Override
    public int insert(Teacher teacher) {
        return teacherMapper.insert(teacher);
    }

    @Override
    public int delete(Integer id) {
        return teacherMapper.delete(id);
    }

    @Override
    public int update(Teacher teacher) {
        return teacherMapper.update(teacher);
    }
}
